package com.pray.praymall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.pray.common.utils.PageUtils;
import com.pray.praymall.product.entity.AttrGroupEntity;
import com.pray.praymall.product.vo.AttrGroupWithAttrsVo;
import com.pray.praymall.product.vo.AttrVo;
import com.pray.praymall.product.vo.SkuItemVo;

import java.util.List;
import java.util.Map;

/**
 * 属性分组
 *
 * @author pray
 * @email pray_cbh@163.com
 * @date 2020-08-29 10:56:49
 */
public interface AttrGroupService extends IService<AttrGroupEntity> {

    PageUtils queryPage(Map<String, Object> params);

    PageUtils queryPage(Map<String, Object> params, Long catalogId);

    /**
     * 根据分类id查出所有的分组以及这些组里面的属性
     *
     * @param catalogId 三级分类id
     * @return AttrGroupWithAttrsVo集合
     */
    List<AttrGroupWithAttrsVo> getAttrGroupWithAttrsByCatelogId(Long catalogId);

    /**
     * 根据spuId和三级分类id查出所有的分组以及这些组里面的属性
     *
     * @param spuId spuId
     * @param catalogId 三级分类的id
     * @return SkuItemVo.SpuItemAttrGroupVo集合
     */
    List<SkuItemVo.SpuItemAttrGroupVo> getAttrGroupWithAttrsBySpuId(Long spuId, Long catalogId);
}

